package com.wangchao.administrator.zenmechi.ui.detailactivity;

import com.wangchao.administrator.zenmechi.bean.goodsdetail.GoodsDetail;
import com.wangchao.administrator.zenmechi.http.HttpHelper;

import java.util.Map;

import rx.Subscriber;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

/**
 * Created by My on 2016/10/19.
 */
public class DetailModel implements DetailContract.Model{
    @Override
    public void getNetworkDate(Subscriber<GoodsDetail> subscriber,String id, Map<String, String> stringMap) {
        HttpHelper.getInstance().getGoodsDetail(id,stringMap)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(subscriber);
    }
}
